<?php
include "./configs/session_check.php";
include "./configs/config.php";
	$day=date("l");
	$login=$day.'LogIn';
	$logout=$day.'LogOut';
	$userid=17871;
	
	
     $daily_schedule=("SELECT $login,$logout FROM DefaultSchedules WHERE EmpID='$userid'");
	 $exc_query=mysql_query($daily_schedule);
	 $schedule_data=mysql_fetch_array($exc_query);
	 $ScheduleLogInTime=$schedule_data[$login];
	 $ScheduleLogOutTime=$schedule_data[$logout];
	 $ActualLogInTime=date("G:i:s");
	 $Dates=date("Y-m-d");
	 
	 
	/* $login_query=mysql_query("INSERT INTO Logins (EmployeeID,Dates,ScheduleLogInTime,ScheduleLogOutTime,ActualLogInTime) VALUES ('$userid','$Dates','$ScheduleLogInTime','$ScheduleLogOutTime','$ActualLogInTime')")
	   or
        die( 'Could not insert data' ); */
	 
	$query=mysql_query(" INSERT INTO `Logins` (`LoginID`, `EmployeeID`, `Dates`, `ScheduledLogInTime`, `ScheduledLogOutTime`, `ActualLogInTime`, `ActualLogOutTime`, `LoginEfficeincy`, `LogOutEfficeincy`, `HoursEfficeincy`, `DailyTimeEfficeincy`) VALUES (NULL, '$userid', '$Dates', '$ScheduleLogInTime', '$ScheduleLogOutTim', '$ActualLogInTime', '00:00:00', NULL, NULL, NULL, NULL)")  or
        die( 'Could not insert data' );
	 

?>